# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.BareMetalSolution.V2.Model.Lun do
  @moduledoc """
  A storage volume logical unit number (LUN).

  ## Attributes

  *   `bootLun` (*type:* `boolean()`, *default:* `nil`) - Display if this LUN is a boot LUN.
  *   `expireTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Time after which LUN will be fully deleted. It is filled only for LUNs in COOL_OFF state.
  *   `id` (*type:* `String.t`, *default:* `nil`) - An identifier for the LUN, generated by the backend.
  *   `instances` (*type:* `list(String.t)`, *default:* `nil`) - Output only. Instances this Lun is attached to.
  *   `multiprotocolType` (*type:* `String.t`, *default:* `nil`) - The LUN multiprotocol type ensures the characteristics of the LUN are optimized for each operating system.
  *   `name` (*type:* `String.t`, *default:* `nil`) - Output only. The name of the LUN.
  *   `shareable` (*type:* `boolean()`, *default:* `nil`) - Display if this LUN can be shared between multiple physical servers.
  *   `sizeGb` (*type:* `String.t`, *default:* `nil`) - The size of this LUN, in GiB.
  *   `state` (*type:* `String.t`, *default:* `nil`) - The state of this storage volume.
  *   `storageType` (*type:* `String.t`, *default:* `nil`) - The storage type for this LUN.
  *   `storageVolume` (*type:* `String.t`, *default:* `nil`) - Display the storage volume for this LUN.
  *   `wwid` (*type:* `String.t`, *default:* `nil`) - The WWID for this LUN.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :bootLun => boolean() | nil,
          :expireTime => DateTime.t() | nil,
          :id => String.t() | nil,
          :instances => list(String.t()) | nil,
          :multiprotocolType => String.t() | nil,
          :name => String.t() | nil,
          :shareable => boolean() | nil,
          :sizeGb => String.t() | nil,
          :state => String.t() | nil,
          :storageType => String.t() | nil,
          :storageVolume => String.t() | nil,
          :wwid => String.t() | nil
        }

  field(:bootLun)
  field(:expireTime, as: DateTime)
  field(:id)
  field(:instances, type: :list)
  field(:multiprotocolType)
  field(:name)
  field(:shareable)
  field(:sizeGb)
  field(:state)
  field(:storageType)
  field(:storageVolume)
  field(:wwid)
end

defimpl Poison.Decoder, for: GoogleApi.BareMetalSolution.V2.Model.Lun do
  def decode(value, options) do
    GoogleApi.BareMetalSolution.V2.Model.Lun.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.BareMetalSolution.V2.Model.Lun do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
